﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.ServiceProcess;


namespace IHISCETeim.SAPSyncSvr
{
    [RunInstaller(true)]
    public partial class ProjectInstaller : System.Configuration.Install.Installer
    {
        public ProjectInstaller()
        {
            InitializeComponent();
        }

        private void SAPSyncSvrInstaller_AfterInstall(object sender, InstallEventArgs e)
        {
              ServiceController controller =new ServiceController(this.SAPSyncSvrInstaller.ServiceName);
                if (controller.Status == ServiceControllerStatus.Stopped)
                {
                    controller.Start();
                    controller.Refresh();
                }
        }
    }
}
